package com.brightness.security.oauth2.server.service.impl;

import com.brightness.security.oauth2.server.domain.TbUser;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.brightness.security.oauth2.server.mapper.TbUserMapper;
import com.brightness.security.oauth2.server.service.TbUserService;
import tk.mybatis.mapper.entity.Example;

/**
 * @author: mailtohgh@163.com
 * @date: 2019/12/30
 * @time: 3:54 下午
 * @descript:
 */
@Service
public class TbUserServiceImpl implements TbUserService{

    @Resource
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser selectByUsername(String username) {
        Example example = new Example(TbUser.class);
        example.createCriteria().andEqualTo("username",username);
        return tbUserMapper.selectOneByExample(example);
    }
}
